import { createStore } from 'vuex'
const  USERINFO="USERINFO"
export default createStore({
  state: {
    userInfo: window.localStorage.getItem(USERINFO)||{}
  },
  getters: {
  },
  mutations: {
    setUserInfo(state,userInfo){
      state.userInfo=userInfo
      window.localStorage.setItem(USERINFO,userInfo)
    }
  },
  actions: {
  },
  modules: {
  }
})
